#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin

# Register your models here.

# 将model注册到admin中，后台管理就能看到。

from app03 import models

#admin.site.register(models.Host)

# 设置打开表后的默认显示。
class  HostInfoAdmin(admin.ModelAdmin):
    list_display = ('HostName','IP')    # 显示的字段必须是在model中定义的
    search_fields = ('HostName','IP')   # 为数据表添加搜索功能，
    list_filter = ('HostName','IP')     # 添加快速过滤

admin.site.register(models.Host,HostInfoAdmin)